<?xml version="1.0" encoding="utf-8"?>
<Content type="xform" name="EditContent">
  <model>
    <instance>
      <tblContent>
        <nContentKey/>
        <nContentPrimaryId/>
        <nVersion/>
        <cContentForiegnRef/>
        <cContentName/>
        <cContentSchemaName>Module</cContentSchemaName>
        <cContentXmlBrief>
          <Content position="" moduleType="iFrame" box="" title="" link="" linkType="internal" resize="false" constrain="true" responsive="true" aspect="" width="" height="" crop="" stretch="false">
            <iframe src="" width="668" height="800" style="border: none;"></iframe>
          </Content>
        </cContentXmlBrief>
        <cContentXmlDetail/>
        <nAuditId/>
        <nAuditKey/>
        <dPublishDate/>
        <dExpireDate/>
        <dInsertDate/>
        <nInsertDirId/>
        <dUpdateDate/>
        <nUpdateDirId/>
        <nStatus>1</nStatus>
        <cDescription/>
        <bCascade/>
      </tblContent>
    </instance>
    <submission id="EditContent" action="" method="post" event="return form_check(this)"/>
    <bind id="cModuleTitle" nodeset="tblContent/cContentName" required="false()" type="string"/>
    <bind nodeset="tblContent/cContentXmlBrief/Content">
      <bind id="cPosition" nodeset="@position" required="true()" type="string"/>
      <bind id="cModuleType" nodeset="@moduleType" required="true()" type="string"/>
      <bind id="cModuleBox" nodeset="@box" required="false()" type="string"/>
      <bind id="cModuleTitle" nodeset="@title" required="false()" type="string"/>
      <bind id="cModuleLink" nodeset="@link" required="false()" type="string"/>
      <bind id="cLinkType" nodeset="@linkType" required="false()" type="string"/>
      <bind id="cResponsive" nodeset="@responsive" required="false()" type="string"/>
      <bind id="cAspect" nodeset="@aspect" required="false()" type="string"/>
      
      <bind nodeset="iframe">
        <bind id="cContentUrl" nodeset="@src" required="false()" type="string"/>
        <bind id="cFrameHeight" nodeset="@height" required="false()" type="string" />
        <bind id="cFrameWidth" nodeset="@width" required="false()" type="string"/>
      </bind>
    </bind>
    <bind id="cContentImage" nodeset="tblContent/cContentXmlBrief/Content/img" required="false()" type="xml-replace"/>
    <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::bind[@nodeset='tblContent/cContentXmlBrief/Content']"/>
    <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::bind[@nodeset='tblContent']"/>
  </model>
  <group ref="EditContent" class="2col">
    <label>Edit iFrame Module</label>
    <group>
      <group>
        <!-- These hidden fields and bindings are required for the component-->
        <input bind="nContentKey" class="hidden">
          <label>ContentId</label>
        </input>
        <input bind="cModuleType" class="hidden">
          <label>ModuleType</label>
        </input>

        <!-- end of hidden fields -->
        <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::group[@id='presentation']"/>
        <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::group[@id='publish']"/>
      </group>
    </group>
    <group>
      <group>
        <label>Frame Title</label>
        <input bind="cModuleTitle" class="long">
          <label>Title or Name</label>
        </input>
      </group>
      
      <group>
        <label>Frame Settings</label>
        <input bind="cContentUrl" class="long">
          <label>URL</label>
        </input>
        
        <select1 bind="cResponsive" appearance="full" class="required">
          <label>Responsive iFrame</label>
          <item>
            <label>Yes</label>
            <value>true</value>
            <toggle case="yResponsive" event="DOMActivate"/>
          </item>
          <item>
            <label>No</label>
            <value>false</value>
            <toggle case="nResponsive" event="DOMActivate"/>
          </item>
        </select1>
        <switch class="disable">
          <case id="yResponsive">
            <select1 bind="cAspect">
              <label>Aspect ratio</label>
              <item>
                <label>4 : 3</label>
                <value>embed-responsive embed-responsive-4by3</value>
              </item>
              <item>
                <label>16 : 9</label>
                <value>embed-responsive embed-responsive-16by9</value>
              </item>
              <item>
                <label>4 : 1</label>
                <value>embed-responsive embed-responsive-4by1</value>
              </item>
            </select1>
          </case>
          <case id="nResponsive">
            <label>Frame Size</label>
            <input bind="cFrameWidth" class="keep_empty">
              <label>Frame Width (Pixels)</label>
            </input>
            <input bind="cFrameHeight" class="keep_empty">
              <label>Frame Height (Pixels)</label>
            </input>
          </case>
        </switch>
        
        
        
        
        
        
       
      </group>
      <group class="inline">
       
      </group>
      
      <group>
        <label>Module Links</label>
        <select1 bind="cLinkType" appearance="full" class="required">
          <label>Type of link</label>
          <item>
            <label>Internal (Going to a page on this site)</label>
            <value>internal</value>
            <toggle case="cLinkType_1" event="DOMActivate"/>
          </item>
          <item>
            <label>External (Going to another site)</label>
            <value>external</value>
            <toggle case="cLinkType_2" event="DOMActivate"/>
          </item>
        </select1>
        <switch class="disable">
          <case id="cLinkType_1">
            <select1 bind="cModuleLink" class="siteTree">
              <label>Link to page</label>
            </select1>
          </case>
          <case id="cLinkType_2">
            <input bind="cModuleLink" class="short">
              <label>Link to URL</label>
            </input>
          </case>
        </switch>
        <input bind="cModuleLinkText" class="long">
          <label>Module footer link text</label>
        </input>
      </group>
    </group>
  </group>
  <group ref="submit" class="contentSubmit">
    <submit submission="" ref="ewSubmit" class="principle">
      <label>Save iFrame</label>
    </submit>
  </group>
</Content>
